﻿using UnityEngine;
using UnityEngine.AddressableAssets;

namespace Example3
{
	public class LoadAssetScript : MonoBehaviour
	{
		[SerializeField]
		private AssetReference _assetRef;

		private async void Start()
		{
			//使用C# 5.0的async/await的扩展方法，能让我们更方便的使用Addressable来进行加载。
			GameObject instance = await _assetRef.Instantiate<GameObject>();
		}
	}
}